<template>
  <header class="header">
    <h1>todos</h1>
    <input
      class="new-todo"
      v-model="info"
      @keyup.13="addTodo"
      placeholder="What needs to be done?"
      autofocus
    >
  </header>
</template>

<script>
export default {
  data() {
    return {
      info: "catlu is infinity"
    };
  },
  methods: {
    addTodo() {
      this.$store.commit("addTodo", { name: this.info });
    }
  }
};
</script>

<style>
</style>
